1. Field of the Invention
The present invention relates to a moving-picture coding device which performs intra-field prediction coding and inter-field prediction coding of a moving-picture comprised of fields.
2. Description of the Related Art
In general, since the amount of a data in a moving-picture is large, high-efficiency coding is performed when the moving-picture data is transmitted from a transmitting device to a receiving device or when the moving-picture data is stored in a storage device. In this case, “high-efficiency coding” is a coding process for converting a certain data string into another data string and is referred to as a process for compressing the data amount.
ISO/IEC MPEG-2/MPEG-4 (hereinafter referred to as MPEG-2 and MPEG-4) are given as representative moving-picture coding methods. There is a need to shorten the time between coding and reproduction at a transmitting side during real time communication using such a moving-picture coding method. Moreover, a low-delay needs to be achieved in the coding at the transmitting side and the decoding at the receiving side.
Description is made below of a low-delay coding method for the MPEG-2 standard based on the Japanese Laid-Open Patent Publication No. Sho60-162392. The MPEG-2 standard defines three kinds of pictures, I, P, and B. The I picture is a picture which is able to restore the image by information only from itself (intra-frame coding), without using a coding image of another picture or prediction. The P picture is a picture obtained by coding the prediction error generated by the inter-picture prediction (inter-frame coding) performed in a forward direction from a past picture. The B picture is a picture obtained by coding (inter-frame coding) the prediction error generated by the inter-picture prediction performed in a bidirectional direction from a past picture and a future picture. Since the B picture uses the future picture for the prediction, the future picture used for the prediction needs to be coded prior to coding the B picture. Therefore, a process for rearranging the pictures in an order of the coding is necessary.
In this case, the method for achieving the low-delay does not use the B picture in order to avoid the delay (caused by the processing of the future picture prior to the prediction of the current picture) of rearranging the pictures.
Moreover, the processing unit of moving-picture coding is a block of 16*16 pixels (macroblock). There are two kinds of macroblocks. One is an intra macroblock in which intra-picture coding is performed, and the other is an inter macroblock in which inter-picture coding is performed.
The whole picture is circulated with the intra slice at a certain interval by shifting a position of the macroblock line little by little. The intra slice is applied depending on each picture by using an intra slice for coding all the data in a macroblock line (slice) formed by horizontally rearranging a certain macroblock as an intra macroblock. This makes it possible to refresh the whole picture in order to achieve the low-delay of the moving-picture coding described above. By such a refresh method, the picture is basically comprised of only the P picture. The size of a buffer can be smaller by not using the I picture, so that the delay caused by the buffer can be reduced.
In this case, however, if an error occurs in the area before the refresh when the macroblock of the slice other than the intra slice of the P picture performs motion compensation by using the vector without limitation, the error is not coded by the intra slice even though the whole picture is circulated with the intra slice. Thus the error is transmitted in a direction of a space. At worst, the error may remain on a screen. In order to solve this problem, as for the slice in which the coding is performed by the intra slice, Japanese Patent Publication No. Hei6-101841 discloses a method for not transmitting the error by inhibiting motion compensation using a nonzero motion vector for a predetermined period only.
When the intra slice and the method for controlling the motion vector of Sho60-162392 and Hei6-101841 described in the Related Art are applied to ITU-T H.264 (hereinafter referred to as the H.264 standard), an international standard of moving-picture coding, there is a problem. It is impossible to prevent transmitting the error in the direction of a space because of an inherent problem of the coding method of the H.264 standard. A difference between the MPEG-2 and the H.264 standards, and a problem inherent in the H.264 standard, is described below.
A syntax called IntraSlice exists in a slice header in the MPEG-2 standard. The macroblock comprising the specified slice can be specified to be constituted by only the intra macroblock by turning on this flag, in order to generate an intra slice. In the H.264 standard, however, the intra slice cannot be generated because this syntax does not exist. This is called an intra slice problem.
Next, in the method for generating the intra macroblock of the MPEG-2 standard, the macroblock is divided into sub-blocks of 8*8 pixels. A discrete cosine transform (DCT) is then performed on the pixel included in the sub-block. Meanwhile, compressibility is improved in the method for generating the intra macroblock of the H.264 standard by employing a method for using an inter-block pixel correlation obtained by the coding of the prediction in the screen of a plurality of modes. That is, the prediction image is generated from a neighboring pixel of the coding target block in the coding of the intra macroblock.
An orthogonal transform is then performed on a prediction error which is different from the prediction image. In this case, slice division is performed above and below the intra macroblock line when the intra slice is used in the MPEG-2 standard. The intra prediction efficiency becomes constant regardless of the slice division because the intra coding does not use the prediction. In the H.264 standard, however, it is possible to perform the intra coding using the prediction from the neighboring pixel.
The prediction mode used for the prediction from the neighboring pixel, e.g. the prediction from the upper side, is limited when the slice division is performed above and below the intra macroblock line. The prediction mode is limited based on the specification because the prediction image is prohibited from being generated from the neighboring pixel across the slice. In this case, the intra efficiency is reduced because of the slice division. This is called an intra prediction efficiency problem.
Furthermore, the H.264 standard specifies that a deblocking filter is provided at a boundary between the macroblock in the coding process and the neighboring macroblock in order to reduce block distortion. In this case, the area above the intra macroblock is an area where the refresh has been completed, and the area below the intra macroblock is a deteriorated area where the refresh has not been completed. When the deblocking filter is provided at the boundary between the macroblock existing in the deteriorated area and the intra macroblock, the refresh area may deteriorate because the pixel component flows into the refreshed area from the deteriorated area. This is called a deblocking filter problem.
Vector limitation is performed in the MPEG-2 standard in such a way that the motion vector is generated only by the refresh area of the past picture when the motion prediction is performed in a forward direction from the past picture in the P picture. The H.264 standard defines a method for generating the motion vector of the color difference component by the motion vector of the luminance component.
The calculation method varies in three cases depending on parity of a reference source field and a reference target field of the motion vector. One is the case when the both fields have the same parity. Another is the case when the former is the top field and the latter is the bottom field. The other is the case when the former is the bottom field and the latter is the top field. A formula of the case when the reference source is the bottom field and the reference target is the top field is described below.MVCy=MVy/2+¼
In this case, MVCy is the color difference vector Y direction component, and MVy is the luminance vector Y direction component.MVCy=¼, when MVy=0
The color difference vector is a positive vector and refers to the lower side of the identical position even though the luminance vector is a zero vector. Originally, the reference is supposed to be permitted because the position of the zero vector in the luminance is inside of the refresh area. However, the color difference refers to the lower side (deteriorated area), so that the pixel component from the deteriorated area flows into the refresh area. Accordingly, the refresh area deteriorates. This is called a vector problem.
An object of the present invention is to solve the above described problem and to provide a moving-picture coding device which achieves low-delay coding using the moving-picture coding method of the H.264 standard.